package com.springboot.mapper;

import java.math.BigDecimal;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.springboot.model.po.Coupon;

@Mapper
public interface CouponMapper {
	@Select("select * from coupon where typeId = #{typeId}")
	public Coupon getCoupon(@Param("typeId")Integer typeId);
	
	@Select("select * from coupon where typeId = #{typeId}")
	public Coupon getCouponValues(@Param("typeId")Integer typeId);
	
	@Select("select usePrice from coupon where typeId = #{typeId}")
	public BigDecimal getCouponUsePrice(@Param("typeId")Integer typeId);
	
	@Select("select * from coupon")
	public List<Coupon> listCoupon();
	
}
